<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
	<title>Editar Lineas</title>
</head>
<body>

<h1>Lineas</h1>
<form:form method="post" action="guardar" modelAttribute="LineaForm">
	<table>
	<tr>
            <th>N.</th>
            <th>Hecho</th>
            <th>Observaciones</th>
            <th>Amigurumi</th>
	</tr>
	<c:forEach items="${LineaForm.lineas}" var="linea" varStatus="status">
            <tr>
                    <td align="center">${status.count}</td>
                    <td><input name="lineas[${status.index}].hecho" value="${linea.hecho}"/></td>
                    <td><input name="lineas[${status.index}].observaciones" value="${linea.observaciones}"/></td>
                    <td><input name="lineas[${status.index}].amigurumi.nombre" value="${linea.amigurumi.nombre}"/></td>
            </tr>
	</c:forEach>
</table>	
<br/>
<input type="submit" value="Guardar" />
	
</form:form>
</body>
</html>